package com.enation.app.shop.front.policyInsurance.service.impl;

import com.enation.app.shop.front.policyInsurance.entity.img.EarMark;
import com.enation.app.shop.front.policyInsurance.service.IEarMarkMapper;
import com.enation.framework.database.IDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("earmarkService")
public class EarMarkService implements IEarMarkMapper {
    @Autowired
    private IDaoSupport daoSupport;
    @Override
    public int deleteByPrimaryKey(Long id) {
        return 0;
    }

    @Override
    public int insert(EarMark record) {
        this.daoSupport.insert("rbt_claim_earmark",record);
        return 1;
    }

    @Override
    public int insertSelective(EarMark record) {
        return 0;
    }

    @Override
    public EarMark selectByPrimaryKey(Long id) {
        return null;
    }

    @Override
    public int updateByPrimaryKeySelective(EarMark record) {
        return 0;
    }

    @Override
    public int updateByPrimaryKey(EarMark record) {
        return 0;
    }

    @Override
    public List<EarMark> getByClaimid(Long id) {
        String sql="select * from rbt_claim_earmark where claim_id=?";
        return this.daoSupport.queryForList(sql,EarMark.class,id);
    }
}
